package cn.sdormitory.controller;

import cn.sdormitory.common.api.CommonResult;
import cn.sdormitory.service.AppVersionService;
import cn.sdormitory.sys.entity.SysAppVersion;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/app/version")
public class AppVersionController {

    @Autowired
    AppVersionService appVersionService;

    @ApiOperation("compare => 对比当前app版本")
    @PostMapping("/compareAppVersion")
    public CommonResult compareAppVersion(@RequestBody SysAppVersion appVersion){
        return appVersionService.compareVersion(appVersion);
    }
}
